//Name:
//Purpose:
//Author: wjy
//Date: 2022-01-11 20:38:45
//From:

#include <stdio.h>
#include <stdlib.h>

int main(void)
{
    int grade;
    printf("Enter numerical grade: ");
    scanf("%d", &grade);
    if (0 <= grade && grade <= 100)
    {
        grade = grade / 10;
        switch (grade)
        {
        case 10:
            printf("Letter grade: A\n");
            break;
        case 9:
            printf("Letter grade: A\n");
            break;
        case 8:
            printf("Letter grade: B\n");
            break;
        case 7:
            printf("Letter grade: C\n");
            break;
        case 6:
            printf("Letter grade: D\n");
            break;
        default:
            printf("Letter grade: F\n");
            break;
        }
    }
    else
    {
        printf("Enter error\n");
    }
    system("pause");
    return 0;
}